package lv.senan.morphology;

import java.util.ArrayList;

/**
 * Represents text with its properties.
 */
public class WordText extends ArrayList<Word> {
	
	private static final long serialVersionUID = 1L;

	public WordText(int capacity) {
		super(capacity);
		for (int i = 0; i < capacity; i++) {
			add(new Word("", WordProperties.UNKNOWN));
		}
	}
	
	@Override
	public String toString() {
		String result = "";
		for (Word word : this) {
			result += word.getCharacters() + "{type = " + WordProperties.getName(word.getType()) + "} ";
		}
		
		return result;
	}
	
}
